<html>
<head>
  <!-- META DATA -->
	<meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="description" content="Free Bootstrap Themes by 365Bootstrap dot com - Free Responsive Html5 Templates">

	<title>婚纱</title>
  
	<!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="css/bootstrap.min.css"  type="text/css">
	
	<!-- Owl Carousel Assets -->
    <link href="owl-carousel/owl.carousel.css" rel="stylesheet">
    <link href="owl-carousel/owl.theme.css" rel="stylesheet">
	
	<!-- Custom CSS -->
    <link rel="stylesheet" href="css/style.css">
	
	<!-- Custom Fonts -->
    <link rel="stylesheet" href="font-awesome-4.4.0/css/font-awesome.min.css"  type="text/css">
	<link href='https://fonts.googleapis.com/css?family=Asap:400,700' rel='stylesheet' type='text/css'>
	
	<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="js/html5shiv.js"></script>
        <script src="js/respond.min.js"></script>
    <![endif]-->
	
</head>

 <body>

	<?php
$id=$_GET["id"];
			mysql_connect("localhost","root");
			mysql_select_db("close");
			mysql_query("set names utf8");
			mysql_query("update wedding set hits=hits+1 where id=$id");
			$rs=mysql_query("select * from wedding where id=$id");//$rs有且仅有一条记录
			$row=mysql_fetch_assoc($rs);//一维数组
?>



 
  <!-- INCLUDES/HEADER.HTML ########################### -->
  <div class="top container">
    <div class="row">
      <div class="col-md-31">
        <img class="toplogo" src="images/logo.png"/>
      </div>
    </div>
  </div>

  <!-- INCLUDES/NAV.HTML ############################## -->
  <div id="nav-wrapper">
    <div id="nav" class="navbar navbar-default navbar-inner container">
        <div class="row">
          <div class="col-md-10 col-md-offset-1">
    
            <!-- BAR CONTENTS -->
            <div class="navbar-header">
              <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
               <span class="sr-only">Toggle navigation</span>
               <span class="icon-bar"></span>
               <span class="icon-bar"></span>
               <span class="icon-bar"></span>
              </button>
              <a class="navbar-brand" href="index.php">Wedding</a>
            </div>

            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
              <!-- LEFT CONTENT -->
              <ul class="nav navbar-nav">
                <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown">婚纱分类 <span class="fa fa-arrow-down"></span></a>
                  <ul class="dropdown-menu" role="menu">
                    <li><a href="#"><span class="glyphicon glyphicon-asterisk"></span> 普通款</a></li>
                    <li class="divider"></li>
                    <li><a href="#" style="font-weight:300"><span class="glyphicon glyphicon-asterisk"></span> 高定款</a></li>
                    <li><a href="#" style="font-weight:300"><span class="glyphicon glyphicon-asterisk"></span> 走秀款</a></li>
                    
                  </ul>
                </li>
              </ul>
              
              <!-- RIGHT CONTENT -->
              <ul class="nav navbar-nav navbar-right">
                <li><a href="index.html"><span class="fa fa-home"></span> Home</a></li>
                <li><a href="contact.html"><span class="fa fa-envelope"></span> Contact</a></li>
              </ul>
            </div>
		
          </div> <!-- col -->
        </div> <!-- row -->
    </div> <!-- nav -->
  </div> <!-- wrapper -->

	<header class="container">
		<!-- CAROUSEL -->
		<div id="carousel-example-generic" class="carousel slide row hidden-xs" data-ride="carousel" data-interval="4000">
			<!-- Indicators -->
			<ol class="carousel-indicators">
				<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
				<li data-target="#carousel-example-generic" data-slide-to="1"></li>
				<li data-target="#carousel-example-generic" data-slide-to="2"></li>
			</ol>
		 
			<!-- Wrapper for slides -->
			<div class="carousel-inner">
				<div class="item active">
					<img src="images/101.jpg" alt="..." style="width:100%">
				</div>
				<div class="item">
					<img src="images/102.jpg" alt="..." style="width:100%">
				</div>
				<div class="item">
					<img src="images/103.jpg" alt="..." style="width:100%">
				</div>
			</div>
		 
			<!-- Controls -->
			<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
				<span class="glyphicon glyphicon-chevron-left"></span>
			</a>
			<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
				<span class="glyphicon glyphicon-chevron-right"></span>
			</a>
		</div> <!-- Carousel -->
	</header>

	
	<!-- /////////////////////////////////////////Content -->
	<div id="page-content" class="single-page container">
	
	<div class="row">
		
		<div class="col-md-6 col-md-offset-1">
			<div id="main-content">
				<article>
					<div class="art-header">
						<a href="#"><h2><?php echo $row["name"]; ?></h2></a>
						<div class="info">
				
							By <?php echo $row["designer"] ?></a><?php echo $row["uptime"] ?>- <i class="fa fa-comment"></i> 点击<?php echo $row["hits"]; ?>
							<ul class="list-inline">
								<li><a href="#" style="text-decoration: underline;color:#333;">Free</a></li>
								<li> - </li>
								<li>

								
									<span class="rating">
										<?php 
									$star=$row["star"];
				
					for($i=1;$i<=$star;$i++){
				echo '<i class="fa fa-star"></i>';
						}
									?>
									</span>
								</li>
							</ul>
						</div>
                   

						<div id="owl-demo1" class="owl-carousel">
							<div class="item">
					<img src="images/<?php echo $row["pic"]; ?>"
					 style="width:250px"
					 class="img-responsive" alt=""/>
							</div>
						
						</div>
					
					</div>
					<div class="art-content">
						<p style="margin-top: 20px">Aenean feugiat in ante et blandit. Vestibulum posuere molestie risus, ac interdum magna porta non. Pellentesque rutrum fringilla elementum. Curabitur tincidunt porta lorem vitae accumsan. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec ac euismod turpis.Aenean feugiat in ante et blandit. Vestibulum posuere molestie risus, ac interdum magna porta non. Pellentesque rutrum fringilla elementum. Curabitur tincidunt porta lorem vitae accumsan. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec ac euismod turpis.</p>
						<h4>Heading</h4>
						<p style="margin-top: 20px">Aenean feugiat in ante et blandit. Vestibulum posuere molestie risus, ac interdum magna porta non. Pellentesque rutrum fringilla elementum. Curabitur tincidunt porta lorem vitae accumsan. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Donec ac euismod turpis.</p>
						<hr>
						
<div>
<?php
			mysql_connect("localhost","root");
			mysql_select_db("close");
			mysql_query("set names utf8");
			$did=$row["id"];
			$rs=mysql_query("select * from comments where did= $did order by id desc");
			while($row1=mysql_fetch_assoc($rs)){
			?>
			姓名：<?php echo $row1["name"]; ?><br>
            邮箱：<?php echo $row1["email"]; ?><br>
            留言：<?php echo $row1["message"]; ?><br>
            发表时间：<?php echo $row1["mtime"]; ?><br>
<?php }  ?>
</div>





                          <div class="comment">
							<h3>发表评论</h3>
							<form name="form1" method="post" action="addcomments.php">
							<input type="hidden" name="cid" value="<?php echo $row["id"];?>">
								<div class="row">
									<div class="col-md-6">
										<div class="form-group">
										<input type="text" class="form-control input-lg" name="name" id="name" placeholder="姓名" required="required" />
										</div>
									</div>
									<div class="col-md-6">
										<div class="form-group">
											<input type="email" class="form-control input-lg" name="email" id="email" placeholder="邮箱" />
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-12">
										<div class="form-group">
											<textarea name="message" id="message" class="form-control" rows="4" cols="25" required="required"
											placeholder="请留言"></textarea>
										</div>						
										<button type="submit" class="btn btn-4 btn-block" name="btnSend" id="btnSend">写评论</button>
									</div>
								</div>
							</form>
						</div>
					</div>
				</article>
			</div>
		</div>
	
	
		<div class="col-md-4">
			<div class="bs-sidebar affix hidden-sm" id="sidebar">
				<h3>Top Download</h3>
				<div id="owl-demo2" class="owl-carousel">
					<?php
			mysql_connect("localhost","root");
			mysql_select_db("close");
			mysql_query("set names utf8");
			$rs=mysql_query("select id,pic from wedding order by hits desc limit 5");
			while($row=mysql_fetch_assoc($rs)){
			?>
					<div class="item">
						<a href="single.html"><img src="images/<?php echo $row["pic"]; ?>"
					 style="width:50px"
					 class="img-responsive" alt=""/></a>
					</div>
					<?php } ?>
				</div>
			<h3>New</h3>
				<div id="owl-demo3" class="owl-carousel">
					<?php
			mysql_connect("localhost","root");
			mysql_select_db("close");
			mysql_query("set names utf8");
			$rs=mysql_query("select id,pic from wedding order by id desc limit 6");
			while($row=mysql_fetch_assoc($rs)){
			?>
					<div class="item">
						<a href="single.html"><img src="images/<?php echo $row["pic"]; ?>"
					 style="width:50px"
					 class="img-responsive" alt=""/></a>
					</div>
					<?php } ?>
				</div>
			</div>
		</div>
    </div>

	
	</div>
	
	<!-- FOOTER -->
	<footer class="container ">
		<div class="row">
			<div class="col-md-4">
				<p>Copyright &copy; 2015.Company name All rights reserved.<a target="_blank" href="http://www.cssmoban.com/">&#x7F51;&#x9875;&#x6A21;&#x677F;</a></p>
			</div>
			<div class="col-md-4">
				<ul class="list-inline social-buttons">
					<li><a href="#"><i class="fa fa-twitter"></i></a>
					</li>
					<li><a href="https://www.facebook.com/365bootstrap"><i class="fa fa-facebook"></i></a>
					</li>
					<li><a href="#"><i class="fa fa-linkedin"></i></a>
					</li>
					<li><a href="#"><i class="fa fa-pinterest"></i></a>
					</li>
				</ul>
			</div>
			<div class="col-md-4">
				<ul class="list-inline quicklinks">
					<li><a href="#">Privacy Policy</a>
					</li>
					<li><a href="#">Terms of Use</a>
					</li>
				</ul>
			</div>
		</div>
	</footer>
  
	<!-- jQuery -->
	<script type="text/javascript" src="js/jquery-2.1.1.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	
	<script>
		if ($(window).width() < 1199) {
			$('#sidebar').affix({
			  offset: {
				top: 398
			  }
			}); 
		} else {
			$('#sidebar').affix({
			  offset: {
				top: 442
			  }
			}); 
		}

		$(function() {
			$('#nav-wrapper').height($("#nav").height());
			
			$('#nav').affix({
				offset: { top: $('#nav').offset().top }
			});
		});
	</script>
	
	<!-- carousel -->
	<script src="owl-carousel/owl.carousel.js"></script>
    <script>
    $(document).ready(function() {
	  $("#owl-demo1").owlCarousel({
        autoPlay: 3000,
        items : 1,
      });
      $("#owl-demo2").owlCarousel({
        autoPlay: 3000,
        items : 3,
      });
	  $("#owl-demo3").owlCarousel({
        autoPlay: 3000,
        items : 3,
      });
    });
    </script>
</body>
</html>